const firstName="赵钱孙李周吴郑王冯陈楚魏将沈韩杨朱琴尤许何吕施章"
const lastName = '氢氦锂铍硼碳氮氧氟氖钠镁铝硅磷硫氯氩钾钙'
const thirdName = '一二三四五六七八九十'
const gender = '男女'
const fn=(a,b)=>Math.floor(Math.random()*(b-a+1))+a
const tableArr=[]
for(let i=0;i<=1000;i++){
    tableArr.push({
        id:i+1,
        age:fn(10,30),
        name:firstName[fn(0,23)]+lastName[fn(0,19)]+thirdName[fn(0,9)],
        gender:gender[fn(0,1)],
        class:fn(1980,1990),
        score:fn(40,60)
    })
}
let pagenum=1
let pagesize=10
let startnum=(pagenum-1)*pagesize
for(let i=startnum;i<startnum+pagesize;i++){
    let trObj=document.createElement('tr')
    trObj.innerHTML=`
    <td> </td>
    <td>${tableArr[i].id} </td>
    <td>${tableArr[i].name} </td>
    <td>${tableArr[i].age} </td>
    <td>${tableArr[i].gender} </td>
    <td>${tableArr[i].class} </td>
    <td>${tableArr[i].score} </td>
    `
    document.querySelector('tbody').appendChild(trObj)
}
